<?php
/**
 * Created By PhpStorm
 * Author: patrick wu
 * Date: 2020/11/10
 * Time: 10:01
 */
namespace App\Http\Model\Mysql;

use Illuminate\Database\Eloquent\Model;

class ProductMaterialModel extends Model
{
    const IS_DELETE =   1,        //已删除
        NOT_DELETE  =   0;        //未删除

    protected $table    =   'mini_product_material';

    protected $guarded  =   [];

    protected $dateFormat   =   'U';

    /**
     * 定义连接
     * @return \Illuminate\Database\Eloquent\Relations\HasOne
     */
    public function user()
    {
        return $this->hasOne(UserModel::class, 'uid', 'uid');
    }
}
